package edu.sjsu.cmpe282.api.resources;
import javax.ws.rs.Consumes;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

import edu.sjsu.cmpe282.domain.Product;
import edu.sjsu.cmpe282.dto.ProductDao;

@Path("/Product")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
public class ProuctResource {

	private ProductDao productdao = new ProductDao();
	
	@POST
	@Path("/addProduct")
	public String addProduct(Product product){
		productdao.addProduct(product);
		return product.getProductName();
	}

}
